package com.yl.paymanagement.config;

import com.alipay.api.domain.Address;
import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RedissionConfig {

  /*  @Value("${spring.redis.host}")
    String  addr;
    @Value("${spring.redis.password}")
    String password;*/
    @Bean
    public RedissonClient redissonClient() {
        Config config = new Config();
        config.useSingleServer().setAddress("redis://121.43.118.165:6379");
//        config.useSingleServer().setPassword("123456");
        return Redisson.create(config);

    }

}
